home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d6 / glazer.arc / INVPRICE.BAS < prev    next >
BASIC Source File  |  1988-10-07  |  1KB  |  26 lines

  1. 100 'Investment Price ("INVPRICE")
  2. 110 CLS
  3. 120 COLOR 0,15 : PRINT "Investment Price" : COLOR 15,0
  4. 130 DEFDBL A-Z
  5. 140 MONEYFMT$ = "$$##,###,###.##"
  6. 150 PRINT : PRINT
  7. 160 PRINT "Do not enter dollar signs or commas"
  8. 170 PRINT
  9. 180 '     Let user enter data
  10. 190 INPUT "Purchase price of investment: ", PV
  11. 200 INPUT "Income each period: ", PMT
  12. 210 INPUT "Desired annual rate of return (in percent): ", AY
  13. 220 INPUT "Total number of periods: ", NPERIODS
  14. 230 INPUT "Number of income receipts per year: ", NPY
  15. 240 INPUT "Annual interest rate (in percent): ", AR
  16. 250 '     Convert annual rates to periodic rates
  17. 260 PR = (1 + AR / 100) ^ (1 / NPY) - 1
  18. 270 PY = (1 + AY / 100) ^ (1 / NPY) - 1
  19. 280 '     Find present value of income stream
  20. 290 IF PR <> 0  THEN VALUEINCOME = (PMT / PR) * (1 - (1 + PR) ^ -NPERIODS)                      ELSE VALUEINCOME = PMT * NPERIODS
  21. 300 '     Find required selling price
  22. 310 FV = PV * (1 + PY) ^ NPERIODS - VALUEINCOME * (1 + PR) ^ NPERIODS
  23. 320 PRINT
  24. 330 PRINT "Required selling price: "; USING MONEYFMT$; FV
  25. 340 END
  26.